package com.liuche.pictureserver.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.liuche.pictureserver.common.resp.PageData;
import com.liuche.pictureserver.pojo.domain.PictureDO;
import com.liuche.pictureserver.pojo.dto.PictureSaveDTO;
import com.liuche.pictureserver.pojo.req.picture.PicturePageReqVO;
import com.liuche.pictureserver.pojo.req.picture.PictureReviewReqVO;
import com.liuche.pictureserver.pojo.req.picture.PictureSaveReqVO;
import com.liuche.pictureserver.pojo.resp.picture.PictureRespVO;
import com.liuche.pictureserver.pojo.resp.picture.PictureSaveReviewRespVO;
import com.liuche.pictureserver.pojo.resp.picture.PictureSimpleInfoVO;

/**
 * @author liuche
 * @description 针对表【picture(图片信息)】的数据库操作Service
 * @createDate 2025-01-14 23:06:58
 */
public interface IPictureService extends IService<PictureDO> {
    /**
     * 上传图片
     *
     * @param saveDTO 文件信息
     * @return 结果
     */
    PictureSimpleInfoVO upload(PictureSaveDTO saveDTO);

    /**
     * 分页查询
     *
     * @param req 查询参数
     * @return 结果
     */
    PageData<PictureRespVO> pageQuery(PicturePageReqVO req);

    /**
     * 根据id获取详情
     *
     * @param id 图片id
     * @return 结果
     */
    PictureRespVO queryById(Long id);

    /**
     * 保存/修改图片信息
     *
     * @param req 请求信息
     * @return 结果
     */
    PictureSaveReviewRespVO save(PictureSaveReqVO req);

    /**
     * 根据url上传图片
     *
     * @param url url信息
     * @return 图片信息
     */
    PictureSimpleInfoVO saveByUrl(String url);

    /**
     * 审核图片
     *
     * @param req 请求信息
     * @return 结果
     */
    Boolean review(PictureReviewReqVO req);
}
